Added helper functions
Fix discrepancy between origin and local