implement add functionality