Fixed code for i/p with /r