make my own validation function