properly scoped Vector2
added generic resolve function