added memory alignment