initial copy from yogento-ext