move code to schwarzwald.js