updated to handle 0 inquiries