minor refactor to use callback selectItems

minor fixes