reference: added basic reference handling