adding some signal handling