added getName function in user class; changed code accordingly;