simplified the from_json functions to not depend on other models