sample code from Streaming Media West presentatipon