cleaned up indentation and formatting