updated deployment logic