refactor: promises
refactor: code cleanup