added shares support for v1

Change-Id: Id00d079a9b3cb12083aa14283488e7eb80bfd7b9
added/copied tests for v2

Change-Id: I273ed0ddee9bea43d7097e97a7dc1900a321cc0d