added check for empty repo