refacotring old methods