Just reformatted everything using built in functions