added solution to q2-duplicate