changed the other place to be case-sensitive, and validate type now