fixed defaults for CUB & added test
added comments in cgi file to better understand the codes