use rapidus for logging
split into smaller functions
0.3.0