Identations fixed and added conditional if both arrays are empty