new sample program
corrected register order