implemented petapoco unit of work pattern