dropped the static of functions in engine.c and put them in engine.h