made some minor changes based on commetns