validate function
starting