added scratch integration and simple example