depth has to be a multiple of 2