extract methods to classes