formatted print working
added func meant to be used from command line
using len(data) insted of total_rows which probably never worked