add sample code for refex4