Changed to non-promise approach