some cleanup and bug fix
generate head_parts dataset