fix unused module and name warnings
use let instead of unnecessary case complication