added optional and partial parts

in the process I changed the format of var from :foo to {foo}