FINAL Code before testing