added authorized check