fixed endl problem