added some front-end code