First version with classes