optimize kingpawn dist