changed up the code