make sure functions are defined before you use them... duh