(test) move model creation into before hook, better memory management