convert to framework, add license and tests