using fabric api for rendering template