adjusted code formatting