refactored_commented_cleaned it up