Modified to_json method for profile