made adjustments after testing output