solving some exercises