it works, doesn't exit smoothly sometime