added subobject check to the contain assertion

closes #33