version with classes worked!