code for assignment one