better way to set the limit