replaced gem validation with home-grown