Solutions to second assigment