loop working but lines not showing up