working on signal handling