refactor for declaration