rewrite to use options attribute