Pushing forward implementation from 26th assignment (after a break).