Added public attribute to codeexample