add class file, removing unnecessary lines