google tells me that 1048576 is the number of bytes in a megabyte. might be nice to make this a constant for readability