stars v1.1; rewrite of code using object oriented programming