improve initAttrs #17