added handling for empty package lists