refactor unfunction grab_source