demo code for mak