add README and LICENCE and minor bug