changed signal handling to promise deferred