implemented chamnge in datastructure for level