completed front end(assignment1)