How to use multiple methods and also instance variables inside a class.