add detach method, fixes #11 #17
docs for detach