added memory limit