basic rx code working