improved readLong