data limit code added, needs testing