fix api calls to be more universal
Code cleanup
method name typo fix