refactored with shorter methods
simplified initialize