changed formatting and coding style