finished question 2. output could be a bit better. solution for that
will be implemented tomorrow.