refactor  general