the cleaned up version