refactored out switch statment to put proper data in html data attribute