removed unnecessary function for encoding