add a messy client main, use for testing and profiling