code formatting improved