First part of homework