HOW DETAILS ARE ENCODED