modifying the patch based on comments.