added adding functionality but prevent D not working