implemented promises in AcceptToSHandler, still need to fix bugs regarding usage of q