missing a space
added a nice wrapper, and the detach statement