refactored running