drone connection refactored

drone code refactored