better variable names, refactor dry