How should I have solved the problem? List 2 better methods.​