added licence and shuffled things around