add license and improve code coverage