edit readme and refactor