Finally adding decode functions, as well as an additional string call for getting index of character