improve code
use getter and setter to access group fields