refactor Base