working first version of grab with config switch formula