add 'expand_by' function