changes for security and stateless