refactor the whole stuff