updated to remove dependancy on set'