finialzed code