adding encoding utility