moved code to stalker.js