refactored vao creation