the oo ruby works, still need function to build json object