added method for removing node