adding dependency injection pattern, adding request logging