use cached element when adding selected class