Rewrote basic example for oop