code validates