First working model with lambda functions