fixed issue #20 with proper coding style