added unix signal handling