wrap in iife
add assertion to test and some formatting