Added all of the functionality besides the validation