cleaned how decision turned into array for swf; added comments;