cleans up promises