add try catch + alerts