remove ser from global. pass it in as part of the api