added comparator to position and made adjustments accordingly