datastructure.js does not work correctly