added function prologue, epilogue, fixed calls
it seems I accidentally the Makefile