refactor with broke