Put code into class