added new functions

a simple write function
a function to aid in selecting from a collection