added auth func