results related code extraction in module results.sh