move deathQueue to utils for better unit test, check utils-test.js