cleaner solution to reference issue