Final working version part1