added selector code to plugins directory