added legal and illegal operations to leson2