Creation of duplicate contract in solidity

I have a contractA and values stored in it.now if i want to create a contractB, which uses all the values stored in contractA and do some manipulations over there, how can i implement it ? (i.e) how can i create a duplicate of a contractA in contractB?