refactoring with good coding style
use beans to add and modify in controllers