fixing klist to function and deleting all inSet