licence and better formatting