made some changes to my sweets array function

made some changes to my sweets array function