view group function implemented
view group works better now