initial commit, based on koala-framework code