move methods to classes. add Package class