fix bugs
fix bugs and add counters
add functions to makefile
add output