cleaner variable check and passing