adding selector code