works but needs comments
Merge branch