added head/tail break clustering