updated coding style and applied indentation