Example code for Maxim_api