quiz - modified php to return object instead of html