refactors helper into utils.