Updated with tests written in class