added validate_value_type function
added an initialization block