removes useless lines