add elements-of-type function.

add elements-of-type function so that compass/reset will work.