app works but must figure out how promises work