Adapting code for ModelAttribute issue #2