just a bit of a refactor that should be a bit of an optimizations because I wont be sending a buffer several time for no reason