made get-issues function more general