update readme and slight refactor