Add restriction to classx