using try to protect