added js function for finding alive cell siblings
js refactoring