Coding drones to stabilize themselfs