added all required front end code