obviously the perf could be way better, but that's ok for now