finished API HW step 2