fix formatting remove redundant code
change print to log statement
#31