fix bug of allocDepth mapping
continue working on