more logic in serve