refactored; auth issue: fixed;