finshed code  config