catch possible exception. This should be refactored: