added encode and decode command