Ahmet's code combined with Dian's code

it is not working entirely but will make it do so