style fix + try catch applied