now shows all results instead of first found result
moved some logic to class in order to be more object-oriented
code cleaned and refactored