put in pseudojs file as example for later rewrite in node