initial working version (for rake)