calculating free space