functions solved