Make api more agnostic