rewrite using strict rules on oop