fix output (somehow working now)