cleanup model hook