added custom selector for optimization, still needs work