minor changes, return boolean, normalize variable name