some front end code that's smartly written