Update maj.cpp

Also what about ties?