refactor levi and deploy