renamed slug to code