add filtering on input
added keys support