inverse function for centerpos added
added missing includes