tail with main