modified $2 check in print
added exit to case 1