adds bias option to countmat wrapper function