completed task 1 of phase 1. yet to verify with test cases