got promises to work with multiple then's
broke out handler function