added proper code formatting