add LICENCE and fix if then error