add method to clean up object for JSON.stringify