added two hacks (memory and SVM) not by me