refactor & improve. forreal doe.