signals from close and ok buttons now caught and acted on