updated compass example to use require option.