Modify setSticks algorithm