The effects of joining and leaving a gang on delinquent offending