New sample mapping code added.