license added, some comments added