Solving some exercises