fixed bug and added solution for task#10