reverted a previous change to validator function