reformated code