move logic server side