optimize front end