moved some of the validation clientside