updated the actor controller to use optional match