Edit to save mechanism in model test function