add memory limitation