New code with classes