added orientation support
added c and d buttons