tidied up hw_svm.sv