add specs, write README, some bug fixed