first version for node (doesn't work yet)