cleaned up likely_decode implementation