moved methods to separate class file