Fixed class-based version