center function (not working fully) and showing real mapping