using sets for all data and removed comments