function declarations to avoid compiler warnings