refactor structure a bit