Update: now accounts for FPG orientation