Formatted Code (attempt 2)