big refactor also