better midX, midY coordinates added