changing macpo script to return relatiev indexes