refactor of systems fns