use try instead use if statment