server side is almost done