server logic complete
add comments
basic test