stolen from AnarchyChess@sopuli.xyz. Holy hell.