add reset links
clean up code