added logic of gitting selected work items