free model

fixes memory leak