added signal trap