modifying impl to match demo