added test
write lat variable