use slots instead of representation. closes #47