moved vao setup to its own function. also made sure vao is only created once