Revert "Refactoring function to look cleaner"
Revert "Refactoring function to look cleaner"

This reverts commit 6b3b92b196e051a28d31a53d53efa2e67c64ea63.

uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi