moved validation