added license and cleaned up a little bit of whitespace