update prepare and test methods