updated example code, found out JSON cant stringify functions