updated find and replace to remove promises in favor of chained callbacks