edited code formatting