more work on memtype