a little design refactor