OO update

updated with PO as an object eliminating need for global variables