updating to reflect changes in teh function