some code to learn front end