finish code and doc of join example