fixed &&, updated, updated test cases