complete app, with all the code