promises are not resolving, added clean function, not working