Added average center calculation