Thirty MSM who had syphilis twice or more since their HIV diagnosis were randomized to receive either daily doxycycline prophylaxis or contingency management ( CM ) with incentive payments for remaining free of sexually transmitted diseases ( STDs ) .