change create_and_attach return type to void