add more exception handle code