added license and preamble to code