Imroved the unified coordinate calculations