Properly implemented the calling convention