refactor slate stuff