added subfunctions for testing binary read/write of populations