added updater for runonce
optimized runonce to fix #103
refactored complete code to psr-2