moved signal() calls