changed back to using mean position of region- taking max produced a weird result