added dpad code