implement up to step 3