small code validation