cleanup according to new API