maojor refactor use, use the new api.
remove an unused method.