further refactor 4