code changes from feedback