reworked validation