updated updatecurrentstocks logic