Revert "put the logic in the completion handler wtf"

This reverts commit 9ffcadaadab5987d84566b51a144200739b0f8ee.