reduced repetition found in the console output method.
reduced complexity of constructor for hooks