improving documentation, converting lists to sets