added throw error for wrong number of sites