gitignore
added previous and following methods to find adjacent items based on given conditions