improve validator component