demo: moved candy functions to separate object