finished js and front end