write own selector library