Handling the empty lists