checking if legality works