"cleanup" of record_dep call, working by luck