some optimizations but buggy player board