updated for cobra sdk