Working version

change in the data structures