move free to after print