deploy logic