second task. improvements, logging, junit tests, 4 different
implementations