optimizing function set to used