fixed add functionality