clean up before new lib implementation