code refactor more clean