My code for resolving tasks