backward search implemented, tested and commented