Implemented functionality for displayMethod()