implement referencing. change lambda list of SELECT