main.c with test frame added