implemented onPreSelect