completed code