changed the cat into tail -1