changed encode method - reduced from 32 to 22 symbols