Adding tests + checking for valid whitelist in argument