reference() method added to make it extensible

--- change ---
and fixup internal reference labeling to make code more readable

one can extend reference() method like as following
1. support predefined labels
2. auto numbered references (more work needed)