improve variable names and snippet readability