Back end code for new front-end