Working on Add Function

Other changes too but Mainly news add function.