#32 added flags and warning messageboxes