move helper methods to helper class