fixed bug with short circuiting ||
added sort()
fixed bugs with change detection and updated example session state