move map variable to start of render