add README, make code much simpler