code for cycle 2 prototypign