filled in some sql funcs for node statuses