Started on arbitrary grid function