modified for stack alignment to 8 bytes