semi-rewrote mcping