edited OOP example. Added GUI example.