add try & catch for errors