correct center calculation