working gpo module
heavily refactored