updated forward implementation to emulate reference collapsing.