abstracting some object selector stuff