refactor: extract a super class to obtain same methods