method not working outside of class

Printable View