reorganized and changed to MIT license