hacked together front end code