added more events
added binary mode to keyvalue