begin separate auth algorithm