finished question 5: corner problem