Another implementation for ex. 1.3