Tracking the dimensionality transition from a threedimensional single crystal to a two dimensional perovskite