add bag extract functions