merging working, need to polish though