optimize premade detection