Start implementing A Buffer algorithm