Moving help function into util from client