reformated with astyle (should be google)