fix some bugs when reading objects and their annotations
add the driving code to view data