working code 1
first finished working code