Server-side code pretty mutch done