added safe perform