catches format exceptions