update limit logic since it was incorrect