creating add functionality