debugging and formatting applied