added method for dynamically adding instance methods at runtime
added discussion