revamping to server side w/ serialization