fixed nested for loops
merging.....
ifblocks work
to complete merge