update to new algorithm