renamed confusing vals.. Needs refactoring