added optional gravity filter