pass before data to value functions as $data