adding routes and basic logic for app