better performance, but not working on big set