'add' function working