some code validation