Updated with new functionality.