Added animation and try block