removed debug statements, cleaned up code formatting.