sample code for revivemx project