updating code and documentation of alignmentSearch()