removing extra lines generating an error