updated legal test cases slightly, added illegal test cases