Completed front end code