cleaned up code formatting for clarity