using processing and a bit of debug