improve validator