add e2e and funcitonal tests