changed code format to java