udpated to datastructure