updated for new secure layers