[refac] refactorized to remove goto's added ability to read payload