add readme and license
minor refactor