copied demo from scaladin3