added params to closure for minifing result code