added max stage filter