fixed evolve method to properly manage borders