write program3