added some minimal code to the controller
now computing the extension in doOutput()