change get courses api function