renamed to onPreSelect