promise function so friggin close to working