Add code to make add function work.