remove old imports
 fix bug and add test
fix subclass