added some comments
merged changes