all but the attach/detach functions have prototype implementations