updates to functionality

Here's the code we talked about today.