tests passing
reimplemented rater to loop less