implemented insert operation