moved var declarations