remove use of attr(), closes #334