added mapping, closing the loop