Refactored to allow for multiple references