added entity validation