improved str implementation using new "with javascript:" style