check out k4bb
i think that that has good code, but check it out