xxx fix space computation