refactor(utilities): extract utility functions to separate module