added tile creation and collapse