added code to traverse and make content bit vector