sorted memory layout, working again