added most of the app, made without testing