doing some validation