seems a first working version of hw2_test.c