continued working on contents function