better style for layer switching