added scott's changes, including re-doing how signals are handled