Added drawFunction to api