Copied solution of tasks 1 and 2 to new extention.