processing script more or less working