Am I missing something, or are you just adding code to pass the db argument to the planSelector that already has an m_db member?