added exception handled