minor changes and code formatting