define functions before they are referenced