Declare functions only once