add max and min functions, and filter alias for select