Updated printMethod
Refactored