base code for app