change offset into long type