Updated generic api