Reused a function that has been used in getting the normal reference frames. Change-Id: Ic4f7dac5c396d689a72699ab79fd580747f8bd65