modified filter and add validation