some new lines added, so code looks better