added writeup and fixed tiebreaking