adding formal readme file and codes changes a lot

sorry for not using git for a long time :-(