added findByAttr; rewrote findById to use findByAttr