The config now handles the object casting
Added throws to method declaration as a warning