add signal handling