updated variable names
updated variables
partially rewrote requiredWith method