finish exception handling but need test