code for the backbone of the ui