minor refactoring and update README