refactoring variable names and layout to be more readable