ready to merge with gaurav's code