trying to refactor some methods so I stpo repeating myself