Assignment 6: Completed segue logic.