modified checkLegal