use name( ) function instead of getName() directly