refactor helpers into several files