add median estimate filter, and fix mean estimate filter