added validate utility method