added comments; display warning messages