big refactor with sti