work on class distance