big refac in progress