+ port from old code