added params for memory