Describe a project where you had to work with legacy code. How did you navigate the existing codebase without breaking functionality?