some minor changes in code