Changed to return object instead of html