tried working with promise more, this way works best and seems to be best practice