refactor printing into importable func
use solver in crack.py