converted base api method to use jquery