add extra view kwargs functionality and move bootstrap to function