fixed minor declaration bug in set
working on bag