refactored simpleTemp into class