added getname function