refactor some of dem methods