Formatted code and added method in and out DEBUG logs