stop using decode
refactored