Figuring out methods and if-else statements