assigning json to a variable to simplify the code.
now accessing the data variable rather than document element. added convenience 'features' function for debugging.