updated compass script