All 2d in one func