added sample validation