hoisted functions