using transition to implement view changing