working version of class experiment