make get_text overlay function more generic to enable to call customized functionget_foo_text