modifying POC restructuring the functions and variables