Changed code to use Position