Working code for security class