need to figure out signal handling