remove unused reference, improve user api