modified output somewhat to be better formatted
implmented 'optional' tag
implemented 'default' tag