Edited variable names to increace code readability