change assoc logic to unshift