Gave it some format and error checking