fixed karan's error