another solution for 005 with set()